Skip to content

fix(transfer): checkbox click evt run repeatedly #6903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 9, 2023

Conversation

kovsu
Copy link
Member

@kovsu kovsu commented Aug 28, 2023

fix: #6010

image

line-height: 1;
align-items: center;

.ant-checkbox {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接写死了 ant 前缀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为好像那里用的是组件,然后有个 top 属性,我只能这样重置了。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

啊 这不对啊,用的组件也是支持自定义的啊

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我再看看

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.x 那个应该是没问题的,我给 antd 也提了 pr,合了

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<li
  ...
>
  <Checkbox
    class={`${prefixCls}-checkbox`}
    checked={checked}
    disabled={disabled || item.disabled}
  />
  {labelNode}
</li>

他这里是这样,然后是因为 checkbox 组件里面的一个 span 的样式有 top: 0.2em 属性,就会导致下面这样
image

& > span {
  top: 0;
}

不写死 .ant 前缀的话,像这样吗?感觉没啥区别

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ant 这个用户可以自定义的,用户如果改成abc,你给写死了不就不生效了

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

& > span {
  top: 0;
}

那就这样?

@kovsu kovsu requested a review from tangjinzhou August 31, 2023 07:39
@tangjinzhou tangjinzhou merged commit eae2b5d into vueComponent:3.x Sep 9, 2023
@kovsu kovsu deleted the fix-6060-3.x branch December 18, 2023 08:56
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants